<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>homework1</title>
</head>
<body>
    <pre>
        str=input("输入字符串：")
        letter_count=number_count=0
        for s in str:
            if 65<=ord(s)<=90 or 97<=ord(s)<=122:
                letter_count=letter_count+1
            elif 48<=ord(s)<=57:
                number_count=number_count+1
        print("{}个字符，{}个数字".format(letter_count,number_count))
    </pre>
</body>
</html>